<template>
  <div class="nav">
    <div>
      <div style="display: flex; align-items: center" @click="toHome">
        <img class="logo_img" src="@/assets/logo.png" />
      </div>

      <!-- <div class="nav-contact">
        <img src="@/assets/phone.png" />
        <div>联系我们</div>
      </div> -->
    </div>
  </div>
</template>
<script setup lang="ts">
import { useRouter } from "vue-router";

const router = useRouter();

const toHome = () => {
  const routeData = router.resolve({
    path: "/home",
  });
  // sessionStorage.setItem("news_info", JSON.stringify(item));
  window.open(routeData.href, "_blank");
};
</script>
<style lang="scss" scoped>
.nav {
  width: 100%;
  height: 9.375rem;
  background-color: #06458b;
  // padding: 0 22.5rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;

  > div {
    width: 75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .logo_img {
    width: 38.5rem;
    height: 2.75rem;
  }
  .nav-contact {
    display: flex;
    cursor: pointer;
    img {
      width: 1.25rem;
      height: 1.25rem;
    }
    div {
      font-size: 1rem;
      color: #ffffff;
      margin-left: 0.5rem;
    }
  }
}
</style>
